﻿@model RedSand.Site.Models.AdvertiseInfo
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<div class="dialog" title="Thêm quảng cáo" style="height:400px">
    @using (Ajax.BeginForm(AdminAjaxOptions.CreateNew))
    { 
        <div class="dialog-content">
            <div class="form-cell" style="width: 500px">
                @Html.LabelFor(model => model.Title)
                @Html.EditorFor(model => model.Title)
            </div>
            <div class="clr"></div>
            <div class="form-cell" style="width: 500px">
                @Html.LabelFor(model => model.Link)
                @Html.EditorFor(model => model.Link)
            </div>
            <div class="clr"></div>
            <div class="form-cell" style="width: 500px">
                @Html.LabelFor(model => model.Position)
                @Html.EditorFor(model => model.Position)
            </div>
            <div class="clr"></div>
            <div class="form-cell">
                @Html.LabelFor(model => model.Status)
                @Html.DropDownListFor(model => model.Status, DropDownListHelper.GetStatusList(false))
            </div>
            <div class="form-cell">
                @Html.LabelFor(model => model.Image)

                <input type="text" name="NewImage" id="upload-image-name" readonly="readonly" class="readonly" />
            </div>
            <div class="form-cell">
                <label>&nbsp;</label>
                <input type="button" id="choose-image" value="..." style="height: 23px; width: 28px; padding:0; text-align:center;" />
            </div>
            <div class="clr" style="padding-top:10px; min-height:300px">
                <img id="upload-image-preview" src="" alt="" width="500" />
            </div>
        </div>
        <div class="dialog-footer">
            <input type="submit" value="@Html.Translate("Save")" />
            <input type="button" value="@Html.Translate("Cancel")" onclick="closeDialog('.dialog')" />
        </div>
    }
    @Html.Partial("_AdminUploadImage")
</div>
